package com.pubinfo.passbook.data.controller.open;

import com.pubinfo.passbook.data.service.ProvingUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "com/pubinfo/passbook/")
@Api(tags = "提供给省财政接口")
@Slf4j

public class provingUserController {
  @Autowired
  ProvingUserService provingUserService;
  
  @PostMapping("provingUser")
  @ApiOperation(value = "验证是否本单位用户")
  public String provingUser(@RequestBody String user) {
    String result = provingUserService.provingUser(user);
    return result;
  }
  
  @PostMapping("receiveInvoiceList")
  @ApiOperation(value = "接收报销票据列表")
  public String receiveInvoiceList(@RequestBody String eInvoice) {
    
    return provingUserService.receiveInvoiceList(eInvoice);
  }
  
  @PostMapping("signature")
  @ApiOperation(value = "获取加密串")
  public String getSignature(String username, String userCode, String enterId) {
    return provingUserService.getSignature(username, userCode, enterId);
  }
}
